package com.yixuan.mt.common.request;

import com.yixuan.mt.common.constant.EventsConstant;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.Size;
import lombok.Data;

@Data
public class EventsMysqlRequest {
    @NotEmpty(message = "事件名不能为空！")
    @Size(max = EventsConstant.EVENT_NAME_MAX_LENGTH, message = "事件名长度不能超过20！")
    private String name;
    @NotEmpty(message = "事件URL不能为空！")
    @Size(max = EventsConstant.EVENT_URL_MAX_LENGTH, message = "事件URL长度不能超过200！")
    private String url;
    @NotEmpty(message = "数据库表名不能为空！")
    @Size(max = EventsConstant.EVENT_DATABASE_TABLE_MAX_LENGTH, message = "数据库表名长度不能超过20！")
    private String databaseTable;
    @NotEmpty(message = "用户名不能为空！")
    @Size(max = EventsConstant.EVENT_USERNAME_MAX_LENGTH, message = "用户名长度不能超过20！")
    private String username;
    @NotEmpty(message = "密码不能为空！")
    @Size(max = EventsConstant.EVENT_PASSWORD_MAX_LENGTH, message = "密码长度不能超过60！")
    private String password;
}
